<template>
  <el-tag :type="realValue.type">{{ realValue.label }}</el-tag>
</template>

<script>
import {mapGetters} from "vuex";

export default {
  name: "StatusShow",
  props: [
    'dataName', 'value'
  ],
  computed: {
    ...mapGetters(['enums']),
    realValue() {
      const enums = this.enums[this.dataName]
      for(let i of enums) {
        if(i.value === this.value) {
          return i
        }
      }
      return {}
    }
  }
}
</script>

<style scoped>

</style>
